
import { createRouter, createWebHashHistory } from 'vue-router'
import content from '../layout/content.vue'

// const routes = [
//   // {
//   //   path: '/:catchAll(.*)',
//   //   name: '404',
//   //   meta: {
//   //     noNeedLogin: true
//   //   },
//   //   component: () => import(/* webpackChunkName: "404" */'../views/error/404.vue')
//   // }
// ]

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: '/',
      redirect: '/home',
      name: 'content',
      component: content,
      children: [
        {
          path: '/home',
          name: 'home',
          component: () => import(/* webpackChunkName: 'home' */'../views/home.vue')
        }
      ]
    },
    {
      path: '/login',
      component: () => import(/* webpackChunkName: 'login' */'../views/login.vue')
    }
  ]
})

export default router
